<%@ page import="java.util.List" %>
<%@ page import="com.westos.haohanbang.bean.Haohan" %>
<%@ page import="java.util.ArrayList" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%

    String msg= "找不到序号";
    List<Haohan> list = (List)application.getAttribute("haohan");
    if(list==null){
        list = new ArrayList();
    }
    String id = request.getParameter("id");

    for(Haohan hh:list){
        if(hh.getId().equals(Integer.valueOf(id))){
            msg = "删除成功";
            list.remove(hh);
            break;
        }
    }

%>
<html>
<head>
    <title>删除</title>
</head>
<body>
    <script>
        alert("<%=msg%>");
        document.location.href="haohanbang.jsp";
    </script>
</body>
</html>
